﻿using Common.Data.Repository;
using CrossSelling.Core.Data.DataContextStorage;
using CrossSelling.Model.Model;
using System.Data.Entity;

namespace CrossSelling.Core.Data.Repository
{
    public class CrossSellingRepository : GenericRepository
    {
        public CrossSellingRepository()
            : base(DataContextFactory.GetDataContext())
        {
        }

        private static CrossSellingRepository _current = null;
        public static CrossSellingRepository Current
        {
            get
            {
                if (_current == null)
                {
                    _current = new CrossSellingRepository();
                }
                return _current;
            }
        }
        public DbSet<Branch> Branchs
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).Branchs;
            }
        }
        public DbSet<Customers> Customers
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).Customers;
            }
        }
        public DbSet<CrossSellingCustomer> CrossSellingI2Bs
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).CrossSellingCustomers;
            }
        }
        public DbSet<CrossSellingProduct> CrossSellingProducts
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).CrossSellingProducts;
            }
        }
        public DbSet<ProductHandbookProduct> ProductHandbookProducts
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ProductHandbookProducts;
            }
        }
        public DbSet<ProductCategory> ProductCategorys
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ProductCategorys;
            }
        }
        public DbSet<ProductHandbookProductDetail> ProductHandbookProductDetails
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ProductHandbookProductDetails;
            }
        }
        public DbSet<CustUsedProductInPast> CustUsedProductInPasts
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).CustUsedProductInPasts;
            }
        }
        public DbSet<ProductSMEByProductHolding> ProductSMEByProductHoldings
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ProductSMEByProductHoldings;
            }
        }
        public DbSet<PreApprovedCreditCard87> PreApprovedCreditCard87s
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).PreApprovedCreditCard87s;
            }
        }
        public DbSet<PreApprovedCreditCard21> PreApprovedCreditCard21s
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).PreApprovedCreditCard21s;
            }
        }
        public DbSet<PreApprovedBilNew> PreApprovedBilNews
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).PreApprovedBilNews;
            }
        }
        public DbSet<PreApprovedWC> PreApprovedWCs
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).PreApprovedWCs;
            }
        }
        public DbSet<RateLimit> RateLimits
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).RateLimits;
            }
        }
        public DbSet<CheckListDocument> CheckListDocuments
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).CheckListDocuments;
            }
        }
        public DbSet<ChecklistQuestion> ChecklistQuestions
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ChecklistQuestions;
            }
        }
        public DbSet<ChecklistCustomer> ChecklistCustomers
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ChecklistCustomers;
            }
        }
        public DbSet<ChecklistDocumentByCustomer> ChecklistDocumentByCustomers
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ChecklistDocumentByCustomers;
            }
        }
        public DbSet<ChecklistQuestionSubProductResult> ChecklistQuestionSubProductResults
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ChecklistQuestionSubProductResults;
            }
        }
        public DbSet<ChecklistSubProduct> ChecklistSubProducts
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ChecklistSubProducts;
            }
        }

        public DbSet<ChecklistHideDocWhenAnswer> ChecklistHideDocWhenAnswers
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).ChecklistHideDocWhenAnswers;
            }
        }
        public DbSet<SaleContestProgramInfo> SaleContestProgramInfos
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).SaleContestProgramInfos;
            }
        }
        public DbSet<SaleContestProgram> SaleContestPrograms
        {
            get
            {
                return ((CrossSellingEntities)this.DbContext).SaleContestPrograms;
            }
        }
    }
}
